<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <link rel="stylesheet" href="css/base.css">
  <link rel="stylesheet" href="css/my.css">
  <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1, user-scalable=no">
</head>
<body style="background:#F2F2F2;">
<div class="header-box">
  <p>我的收获地址</p>
</div>
<div class="shipAddress">
  <div class="shipAddress_box">
    <ul>
      <li>
        <p><b>杨小羊</b><i>15951658163</i></p>
        <p>北京市 昌平区 回龙观东大街 来来去去小区3号楼5单元 502室</p>
        <i></i>
        <p>
          <a class="moren_addr">
            <img src="img/my/tuceng 4@2x.png" class="img1"><span class="spa1 spa_active">默认地址</span>
          </a>
          <a href="addAddress.html">
            <img src="img/my/tuceng 5@2x.png" class="img2"><span class="spa2">编辑</span>
          </a>
          <a href="shipAddress.html">
            <img src="img/my/tuceng 6@2x.png" class="img3"><span class="spa3">删除</span>
          </a>
        </p>
      </li>
      <li>
        <p><b>杨小羊</b><i>15951658163</i></p>
        <p>北京市 昌平区 回龙观东大街 来来去去小区3号楼5单元 502室</p>
        <i></i>
        <p>
          <a class="moren_addr">
            <img src="img/my/yuanju 10@2x.png" class="img1"><span class="spa1">设置默认地址</span>
          </a>
          <a href="addAddress.html">
            <img src="img/my/tuceng 5@2x.png" class="img2"><span class="spa2">编辑</span>
          </a>
          <a href="shipAddress.html">
            <img src="img/my/tuceng 6@2x.png" class="img3"><span class="spa3">删除</span>
          </a>
        </p>
      </li>
    </ul>
  </div>
</div>
<div class="add_address">
  <a href="addAddress.html">增加地址</a>
</div>
</body>
<script src="js/jquery.js"></script><script src="js/jquery.cookie.js"></script>
<script src="js/base.js?v=base.js?v=20180102"></script>
<script>
  $('.moren_addr').click(function () {
    $(this).children('span').html('默认地址').addClass('spa_active');
    $(this).children('img').attr('src','img/my/tuceng 4@2x.png');
    $(this).parent('p').parent('li').siblings().children('p').children('a.moren_addr').children('span').html('设置默认地址').removeClass('spa_active');
    $(this).parent('p').parent('li').siblings().children('p').children('a.moren_addr').children('img').attr('src','img/my/yuanju 10@2x.png');
  });
</script>
</html>